home *** CD-ROM | disk | FTP | other *** search
/ OpenGL Superbible (2nd Edition) / OpenGL SuperBible e2.iso / tools / Mesa-3.0 / SRC / CONFIG.H < prev    next >
Encoding:
C/C++ Source or Header  |  1998-09-16  |  4.3 KB  |  220 lines

  1. /* $Id: config.h,v 3.5 1998/09/16 02:25:53 brianp Exp $ */
  2.  
  3. /*
  4.  * Mesa 3-D graphics library
  5.  * Version:  3.0
  6.  * Copyright (C) 1995-1998  Brian Paul
  7.  *
  8.  * This library is free software; you can redistribute it and/or
  9.  * modify it under the terms of the GNU Library General Public
  10.  * License as published by the Free Software Foundation; either
  11.  * version 2 of the License, or (at your option) any later version.
  12.  *
  13.  * This library is distributed in the hope that it will be useful,
  14.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  16.  * Library General Public License for more details.
  17.  *
  18.  * You should have received a copy of the GNU Library General Public
  19.  * License along with this library; if not, write to the Free
  20.  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  21.  */
  22.  
  23.  
  24. /*
  25.  * $Log: config.h,v $
  26.  * Revision 3.5  1998/09/16 02:25:53  brianp
  27.  * removed some Amiga-specific stuff
  28.  *
  29.  * Revision 3.4  1998/06/22 03:16:15  brianp
  30.  * added VB_MAX define and MITS test
  31.  *
  32.  * Revision 3.3  1998/06/07 22:18:52  brianp
  33.  * implemented GL_EXT_multitexture extension
  34.  *
  35.  * Revision 3.2  1998/06/02 23:51:04  brianp
  36.  * added CHAN_BITS and GLchan type (for the future)
  37.  *
  38.  * Revision 3.1  1998/02/20 04:53:37  brianp
  39.  * implemented GL_SGIS_multitexture
  40.  *
  41.  * Revision 3.0  1998/01/31 20:48:53  brianp
  42.  * initial rev
  43.  *
  44.  */
  45.  
  46.  
  47.  
  48. /*
  49.  * Tunable configuration parameters.
  50.  */
  51.  
  52.  
  53.  
  54. #ifndef CONFIG_H
  55. #define CONFIG_H
  56.  
  57.  
  58. /*
  59.  *
  60.  * OpenGL implementation limits
  61.  *
  62.  */
  63.  
  64.  
  65. /* Maximum modelview matrix stack depth: */
  66. #define MAX_MODELVIEW_STACK_DEPTH 32
  67.  
  68. /* Maximum projection matrix stack depth: */
  69. #define MAX_PROJECTION_STACK_DEPTH 32
  70.  
  71. /* Maximum texture matrix stack depth: */
  72. #define MAX_TEXTURE_STACK_DEPTH 10
  73.  
  74. /* Maximum attribute stack depth: */
  75. #define MAX_ATTRIB_STACK_DEPTH 16
  76.  
  77. /* Maximum client attribute stack depth: */
  78. #define MAX_CLIENT_ATTRIB_STACK_DEPTH 16
  79.  
  80. /* Maximum recursion depth of display list calls: */
  81. #define MAX_LIST_NESTING 64
  82.  
  83. /* Maximum number of lights: */
  84. #define MAX_LIGHTS 8
  85.  
  86. /* Maximum user-defined clipping planes: */
  87. #define MAX_CLIP_PLANES 6
  88.  
  89. /* Number of texture levels */
  90. #ifdef FX
  91. #define MAX_TEXTURE_LEVELS 9
  92. #else
  93. #define MAX_TEXTURE_LEVELS 11
  94. #endif
  95.  
  96. /* Max texture size */
  97. #define MAX_TEXTURE_SIZE   (1 << (MAX_TEXTURE_LEVELS-1))
  98.  
  99. /* Maximum pixel map lookup table size: */
  100. #define MAX_PIXEL_MAP_TABLE 256
  101.  
  102. /* Number of auxillary color buffers: */
  103. #define NUM_AUX_BUFFERS 0
  104.  
  105. /* Maximum order (degree) of curves: */
  106. #ifdef AMIGA
  107. #   define MAX_EVAL_ORDER 12
  108. #else
  109. #   define MAX_EVAL_ORDER 30
  110. #endif
  111.  
  112. /* Maximum Name stack depth */
  113. #define MAX_NAME_STACK_DEPTH 64
  114.  
  115. /* Min and Max point sizes and granularity */
  116. #define MIN_POINT_SIZE 1.0
  117. #define MAX_POINT_SIZE 10.0
  118. #define POINT_SIZE_GRANULARITY 0.1
  119.  
  120. /* Min and Max line widths and granularity */
  121. #define MIN_LINE_WIDTH 1.0
  122. #define MAX_LINE_WIDTH 10.0
  123. #define LINE_WIDTH_GRANULARITY 1.0
  124.  
  125. /* Max texture palette size */
  126. #define MAX_TEXTURE_PALETTE_SIZE 256
  127.  
  128. /* Number of texture maps and environments - GL_EXT_multitexture */
  129. #define MAX_TEX_SETS 2
  130.  
  131. /* Number of texture coordinate sets - GL_EXT_multitexture */
  132. #define MAX_TEX_COORD_SETS 2
  133.  
  134. /* Maximum viewport size: */
  135. #define MAX_WIDTH 1600
  136. #define MAX_HEIGHT 1200
  137.  
  138.  
  139.  
  140.  
  141. /*
  142.  *
  143.  * Mesa-specific parameters
  144.  *
  145.  */
  146.  
  147.  
  148. /*
  149.  * Bits per color channel (must be 8 at this time!)
  150.  */
  151. #define CHAN_BITS 8
  152.  
  153.  
  154. /*
  155.  * Bits per accumulation buffer color component:  8 or 16
  156.  */
  157. #define ACCUM_BITS 16
  158.  
  159.  
  160. /*
  161.  * Bits per depth buffer value:  16 or 32
  162.  */
  163. #define DEPTH_BITS 16
  164.  
  165. #if DEPTH_BITS==16
  166. #  define MAX_DEPTH 0xffff
  167. #  define DEPTH_SCALE 65535.0F
  168. #elif DEPTH_BITS==32
  169. #  define MAX_DEPTH 0x00ffffff
  170. #  define DEPTH_SCALE ((GLfloat) 0x00ffffff)
  171. #else
  172.    invalid value!
  173. #endif
  174.  
  175.  
  176. /*
  177.  * Bits per stencil value:  8
  178.  */
  179. #define STENCIL_BITS 8
  180.  
  181.  
  182.  
  183. /*
  184.  * Color channel component order
  185.  * (changes will almost certainly cause problems at this time)
  186.  */
  187. #define RCOMP 0
  188. #define GCOMP 1
  189. #define BCOMP 2
  190. #define ACOMP 3
  191.  
  192.  
  193.  
  194. /*
  195.  * Vertex buffer size.  Must be a multiple of 12.
  196.  */
  197. #if defined(FX) && !defined(MITS)
  198. #  define VB_MAX 72   /* better performance */
  199. #else
  200. #  define VB_MAX 480
  201. #endif
  202.  
  203.  
  204.  
  205. /*
  206.  *
  207.  * For X11 driver only:
  208.  *
  209.  */
  210.  
  211. /*
  212.  * When defined, use 6x6x6 dithering instead of 5x9x5.
  213.  * 5x9x5 better for general colors, 6x6x6 better for grayscale.
  214.  */
  215. /*#define DITHER666*/
  216.  
  217.  
  218.  
  219. #endif
  220.